package org.come.bean;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class AllMeridians {

	private Map<Integer, List<Meridians>> meridiansMap = new HashMap<>();

	public Map<Integer, List<Meridians>> getMeridiansMap() {
		return meridiansMap;
	}

	public void setMeridiansMap(Map<Integer, List<Meridians>> meridiansMap) {
		this.meridiansMap = meridiansMap;
	}

	public Meridians getByQuality(int id, int quality) {
		for (Meridians m : meridiansMap.get(id)) {
			if (m.getQuality() == quality) {
				return m;
			}
		}
		return null;
	}
}
